#!/usr/bin/env /data/webserver/php/bin/php
<?php
/**
 * Yii console bootstrap file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
// fcgi doesn't have STDIN and STDOUT defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));

//导入加载类
require(__DIR__ . '/vendor/autoload.php');

//导入环境配置类
require(__DIR__ . "/common/config/environment.php");
$environment = new Environment(__DIR__ . '/console');
$config = $environment->getConfig();
unset($config['components']['user']);

//导入框架核心类
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/common/config/bootstrap.php');
require(__DIR__ . '/console/config/bootstrap.php');

//实例化应用并执行
$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);
